<template>
  <div>

    <productList></productList>
    <navBot></navBot>
  </div>
</template>

<script>

import productList from '~/components/base/productList.vue';
import navBot from '~/components/common/navBot.vue';

export default {
  data() {
    return {
      ts: this.newStore(),
      headTitle: '商品列表页',
      resdata: {},
    };
  },
  created() {
    this.login();
    this.$indicator.open({
      text: '加载中',
      spinnerType: 'fading-circle',
    });
  },
  methods: {
    login() {
      const req = {
        handle: 'E299744D88ADCDF5C56442DDF419DB4E33B34DAB6D91425D',
        id: 'super',
        passwords: 'qwe123',
      };
      this.spost(this.ts, '/mainservlet', req).then((ts) => {
        localStorage.setItem('token', ts.d.token);
        console.log(localStorage.getItem('token'));
        this.resdata = ts.d.data.operation3;
        this.$indicator.close();
      });
    },
  },
  components: {
    productList,
    navBot,
  },
};
</script>

<style>

</style>
